package bist.believeinstep.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import bist.believeinstep.domain.TourImage;

public class TourImageMapper implements RowMapper<TourImage> {
	public TourImage mapRow(ResultSet rs, int numRow) throws SQLException{
		TourImage tourImage = new TourImage();
		
		tourImage.setId(rs.getInt("id"));
		tourImage.setTourId(rs.getInt("bist_tours_id"));
		tourImage.setImageId(rs.getInt("bist_images_id"));
		tourImage.setCreated(rs.getTimestamp("created_date"));
		tourImage.setModified(rs.getTimestamp("modified_date"));
		tourImage.setCreatedBy(rs.getString("created_by"));
		tourImage.setModifiedBy(rs.getString("modified_by"));
		
		return tourImage;
	}
}
